﻿@model Wicresoft.SelfService.DAO.AccountInfo
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@{
    ViewBag.Title = "帐号管理";
    Layout = "~/Views/Shared/_DetailLayout.cshtml";
}
@using (Html.BeginForm())
{

    <div class="center_box_bg">
        <div class="box_padding">
            @if (Model != null)
            {
                <div class="box_bg">
                    <div class="box_padding">
                        <div class="border_line">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tbody>
                                    <tr>
                                        <td width="20%" class="tdName">
                                            <label for="Account">
                                                帐号</label>
                                        </td>
                                        <td width="30%" class="tdData">
                                            <input class="text-box single-line" id="Account" name="Account" type="text" value="@Model.Account"
                    readonly="readonly" style="background-color:#999"/>
                                        </td>
                                        <td class="tdData">
                                        </td>
                                        <td class="tdData">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" class="tdName">
                                            <label for="NewPassword">
                                                新密码</label>
                                        </td>
                                        <td width="30%" class="tdData">
                                            <input class="text-box single-line" id="NewPassword" name="NewPassword" type="password"
                                                value="" />
                                        </td>
                                        <td class="tdData">
                                            <span class="fontred">保持为空将不会更改密码</span>
                                        </td>
                                        <td class="tdData">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" class="tdName">
                                            <label for="ConfirmPassword">
                                                密码确认</label>
                                        </td>
                                        <td width="30%" class="tdData">
                                            <input class="text-box single-line" id="ConfirmPassword" name="ConfirmPassword" type="password"
                                                value="" />
                                        </td>
                                        <td class="tdData">
                                        </td>
                                        <td class="tdData">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" class="tdName">
                                            <label for="Company">
                                                公司</label>
                                        </td>
                                        <td width="30%" class="tdData">
                                            <input class="text-box single-line" id="Company" name="Company" type="text" value="@Model.Company"
                    readonly="readonly" style="background-color:#999" />
                                        </td>
                                        <td class="tdData">
                                        </td>
                                        <td class="tdData">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" class="tdName">
                                            <label for="Dept">
                                                部门</label>
                                        </td>
                                        <td width="30%" class="tdData">
                                            @Html.DropDownList("DepartmentSelect", ViewData["Departments"] as IEnumerable<SelectListItem>, new { style = "width: 155px;" })
                                            @*<input class="text-box single-line" id="Dept" name="Dept" type="text" value="@Model.Dept" />*@
                                        </td>
                                        <td class="tdData">
                                        </td>
                                        <td class="tdData">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" class="tdName">
                                            <label for="Position">
                                                职位</label>
                                        </td>
                                        <td width="30%" class="tdData">
                                            <input class="text-box single-line" id="Position" name="Position" type="text" value="@Model.Position" />
                                        </td>
                                        <td class="tdData">
                                        </td>
                                        <td class="tdData">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdName">
                                            @Html.LabelFor(model => model.Phone)
                                        </td>
                                        <td class="tdData">
                                            @Html.TextBoxFor(model => model.Phone)<span class="fontred">*</span>
                                        </td>
                                        <td class="tdData">
                                            <span class="fontred">@Html.ValidationMessageFor(model => model.Phone)</span>
                                        </td>
                                        <td class="tdData">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="20%" class="tdName">
                                            <label for="Mail">
                                                邮箱</label>
                                        </td>
                                        <td width="30%" class="tdData">
                                            <input class="text-box single-line" id="Mail" name="Mail" type="text" value="@Model.Mail" />
                                        </td>
                                        <td class="tdData">
                                        </td>
                                        <td class="tdData">
                                        </td>
                                    </tr>
                                    @if (ViewData["Error0"] != null)
                                    {
                                        <tr>
                                            <td colspan="4" align="center">
                                                <span style="color: Red">@ViewData["Error0"].ToString()</span>
                                            </td>
                                        </tr>
                                    }
                                    @if (ViewData["Error1"] != null)
                                    {
                                        <tr>
                                            <td colspan="4" align="center">
                                                <span style="color: Red">@ViewData["Error1"].ToString()</span>
                                            </td>
                                        </tr>
                                    }
                                    @if (ViewData["Error2"] != null)
                                    {
                                        <tr>
                                            <td colspan="4" align="center">
                                                <span style="color: Red">@ViewData["Error2"].ToString()</span>
                                            </td>
                                        </tr>
                                    }
                                    @if (ViewData["Error3"] != null)
                                    {
                                        <tr>
                                            <td colspan="4" align="center">
                                                <span style="color: Red">@ViewData["Error3"].ToString()</span>
                                            </td>
                                        </tr>
                                    }
                                    @if (ViewData["Error4"] != null)
                                    {
                                        <tr>
                                            <td colspan="4" align="center">
                                                <span style="color: Red">@ViewData["Error4"].ToString()</span>
                                            </td>
                                        </tr>
                                    }
                                    <tr>
                                        <td colspan="4" align="center">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="4" align="center">
                                            <input type="submit" value="保存" class="Button1 ui-icons subForward" title="保存" />
                                            <input type="button" value="返回首页" class="Button1 ui-icons subForward" title="返回首页" onclick="javascript:window.location='/ITService/Index';"/>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="box_down ui-icons">
                </div>
            }
            else
            {
                @Html.ActionLink("帐号信息错误，点击返回登录", "LogOn", "Account", null, null)  
            }
        </div>
    </div>
}